import { request } from '@pkg/request/src';

export enum Api {
  page = '/delayrisk/page',
  list = '/delayrisk/list',
  get = '/delayrisk/get',
  add = '/delayrisk/save',
  update = '/delayrisk/update',
  remove = '/delayrisk/remove',
  delayriskCheckSub = '/delayrisk/checkSub',
}

export const getDelayrisk = (params) =>
  request.get(
    { url: Api.get, params: params },
    {
      errorMessageMode: 'none',
      successMessageMode: 'none',
    },
  );

export const delayriskCheckSub = (params) =>
  request.post(
    { url: Api.delayriskCheckSub, params: params },
    {
      errorMessageMode: 'none',
    },
  );
